home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual Foxpro 6.0 (Ent. Edition) / Vf6ent Extractor.EXE / TOOLS / XSOURCE / XSOURCE.ZIP / vfpsource / wizards / Wztable / wzdbc.prg < prev    next >
Encoding:
Text File  |  1998-05-01  |  1.7 KB  |  61 lines

  1. PARAMETERS cOutputVarname, p2, p3, p4, p5, p6, p7, p8, p9
  2.  
  3. * cOutputVarname holds the name of the wizard.app memvar, as a char string, that will return the name
  4. * of the created file to the project manager. This parameter is passed into the wizard in the CREATE 
  5. * statement below. Wiztemplate handles storing the name of the created file to the contents of this memvar.
  6.  
  7. * cOutputFilename is a memvar created in this program that will also hold the name of the created file, to
  8. * support the MODIFY and BROWSE options below, coming out of the wizard. It gets updated in the ProcessOutput
  9. * method of the wizard's engine, and has nothing to do with Wiztemplate or the memvar that gets passed back to
  10. * the Project Manager.
  11.  
  12. private cClassLib
  13. local cOnError, lError
  14.  
  15. m.wzt_outoption = 1
  16. m.cOutputFilename = ""
  17.  
  18. m.cClassLib = set('classlib')
  19.  
  20. SET CLASSLIB TO wzdbc
  21.  
  22. PUBLIC oWizard
  23.  
  24. * The name "oWizard" is used in automated testing and should *NOT* be changed.
  25. * The wizard will save and restore the environment, so no need to do it here
  26.  
  27. oWizard = CREATE("DBCWizard",m.cOutputVarname, m.p2, m.p3, m.p4, m.p5, m.p6, m.p7, m.p8, m.p9)
  28. #if .f.
  29. on error &cOnError
  30. #endif
  31.  
  32. if type('oWizard') = 'O' .and. .not. isnull(oWizard)
  33.     oEngine.aEnvironment[17,1] = m.cClassLib
  34.     oWizard.Show
  35. endif
  36. if type('oWizard') = 'O' .and. .not. isnull(oWizard)
  37.     * It must be modeless, so leave it alone
  38. else
  39.     release oWizard
  40.     CLEAR CLASS DBCWizard
  41.     CLEAR CLASS wiztemplate
  42. endif
  43.  
  44. SET MESSAGE TO
  45.  
  46. IF TYPE("m.cOutputFilename") = "C"
  47.     IF NOT EMPTY(m.cOutputFilename) 
  48.         IF FILE(m.cOutputFilename)
  49.             DO CASE
  50.                 CASE m.wzt_outoption = 2
  51.                     OPEN DATABASE (m.cOutputFilename) EXCLUSIVE
  52.                     MODIFY DATABASE
  53.             ENDCASE
  54.         ENDIF
  55.     ENDIF
  56. ENDIF
  57.  
  58.  
  59.  
  60. RETURN
  61.